import axios from "@/common/axios";
import { API_URL } from "@/common/constants";

export const doLogin = async (json) => {
  let { data } = await axios.post(API_URL + "cSecUserApi/login", json);
  return data;
};


export const getUserInfo = async (userId) => {
  let { data } = await axios.get(API_URL + `cSecUserApi/queryUser/${userId}`);
  return data;
};

export const logout = async () => {
  let { data } = await axios.get(API_URL + "cSecUserApi/logout");
  return data;
};

export const updateUserNameAndPassword = async (json) => {
  let { data } = await axios.post(API_URL + `cSecUserApi/updateUserNameAndPassword`, json);
  return data;
};

